package org.jks.model;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.google.gson.annotations.Expose;

@Entity
@Table(name = "FlightLine")
public class FlightLine {
	@Id
	@GeneratedValue(generator = "increment")
	@GenericGenerator(name = "increment", strategy = "increment")
	@Expose
	private long Id;
	@Column(length = 64, nullable = false)
	@Expose
	private String Name;
	@OneToMany(mappedBy = "FlightLine", fetch = FetchType.LAZY, cascade = { CascadeType.ALL }, orphanRemoval = true)
	@Expose
	private List<TowerCoordinate> TowerCoordinates;
	@OneToMany(mappedBy = "FlightLine", fetch = FetchType.LAZY, cascade = { CascadeType.ALL }, orphanRemoval = true)
	@Expose
	private List<FlightAngle> FlightAngles;

	public long getId() {
		return Id;
	}

	public void setId(long id) {
		Id = id;
	}

	public String getName() {
		return Name;
	}

	public void setName(String name) {
		Name = name;
	}

	public List<TowerCoordinate> getTowerCoordinates() {
		return TowerCoordinates;
	}

	public void setTowerCoordinates(List<TowerCoordinate> towerCoordinates) {
		TowerCoordinates = towerCoordinates;
	}

	public List<FlightAngle> getFlightAngles() {
		return FlightAngles;
	}

	public void setFlightAngles(List<FlightAngle> flightAngles) {
		FlightAngles = flightAngles;
	}
	

}
